package com.ruoyi.manage.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.manage.domain.BmInorderlist;
import com.ruoyi.manage.service.BmInorderlistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 订单配送流程Controller
 *
 * @author ruoyi
 * @date 2022-11-12
 */
@RestController
@RequestMapping("/inorderlist")
public class BmInorderlistController extends BaseController
{
    @Autowired
    private BmInorderlistService bmInorderlistService;

    /**
     * 查询订单配送流程列表
     */
    @GetMapping("/selectBmInorderlistList")
    public TableDataInfo list(BmInorderlist bmInorderlist) {
        System.out.println(bmInorderlist);
        startPage();
        List<BmInorderlist> list = bmInorderlistService.selectBmInorderlistList(bmInorderlist);
        return getDataTable(list);
    }

    @GetMapping("/selectBmInordergoodslistList")
    public TableDataInfo selectBmInordergoodslistList(BmInorderlist bmInorderlist) {
        System.out.println(bmInorderlist);
        List<BmInorderlist> list = bmInorderlistService.selectBmInordergoodslistList(bmInorderlist);
        return getDataTable(list);
    }

    @GetMapping("/selectBmInordergoodslistTable")
    public TableDataInfo selectBmInordergoodslistTable(BmInorderlist bmInorderlist) {
        System.out.println(bmInorderlist);
        List<BmInorderlist> list = bmInorderlistService.selectBmInordergoodslistTable(bmInorderlist);
        return getDataTable(list);
    }

    /**
     * 修改订单配送步骤
     */
    @PutMapping("/updateOrderStep")
    public AjaxResult edit(@RequestBody BmInorderlist bmInorderlist) {
        return toAjax(bmInorderlistService.updateOrderStep(bmInorderlist));
    }

}

